/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.example.layer;

import java.util.List;

import chunmap.example.BaseGeometryMap;
import chunmap.model.geom.Geometry;
import chunmap.model.geom.WktReader;

/**
 * @author chunquedong
 * 
 */
public class GeometryLayer extends BaseGeometryMap{

	public static void main(String[] args) {
		GeometryLayer me = new GeometryLayer();
		me.init();
	}

	@Override
	protected void addGeometry(List<Geometry> geoms) {
		WktReader wkt = new WktReader();
		Geometry g = wkt.read("LineString(0 0,-2 2)");
		Geometry g2 = wkt
				.read("POLYGON((-5 -8,10 -20,20 15,-10 10,-5 -8),(1 2,3 1,4 0,3 -2,0 0,1 2))");
		Geometry g3 = wkt.read("LineString(0 100,-1 250)");
		Geometry g4 = wkt.read("LineString(0 100,1 250)");
		Geometry g5 = wkt.read("LineString(0 100,0 250)");
		Geometry g6 = wkt.read("LineString(0 100,100 101)");
		Geometry g7 = wkt.read("LineString(0 100,100 100)");
		Geometry g8 = wkt.read("LineString(0 100,100 99)");

		Geometry g9 = wkt.read("LineString(0 100,1 101)");
		Geometry g10 = wkt.read("LineString(0 100,-1 101)");
		Geometry g11 = wkt.read("LineString(0 100,-1 99)");

		geoms.add(g);
		geoms.add(g2);
		geoms.add(g3);
		geoms.add(g4);
		geoms.add(g5);
		geoms.add(g6);
		geoms.add(g7);
		geoms.add(g8);
		geoms.add(g9);
		geoms.add(g10);
		geoms.add(g11);
	}
}